home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------------------------------
- // mesh_debug_Artefacts.fx
- //
- // file type: Shader File
- // Usage : line rendering
- //
- //------------------------------------------------------------------------------------------------------
-
- #include "shared.fx"
- #include "lighting.fx"
- #define FOG_DISABLE
- #include "fog.fx"
-
- texture DiffuseMap;
-
- //------------------------------------
- struct vertexInput
- {
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 DiffuseUV : TEXCOORD0;
- };
-
- struct vertexOutput
- {
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 DiffuseUV: TEXCOORD0;
- FOG_OPTION_VERTEX_FIELD
- };
-
- //------------------------------------
- vertexOutput VS_Trail_Tranform(vertexInput input)
- {
- vertexOutput output;
- output.Position = mul (input.Position,CameraProjection);
- output.Color = input.Color;
- output.DiffuseUV = input.DiffuseUV;
-
-
- // fog computation
- FOG_OPTION_COMPUTE(output, output.Position);
-
- return output;
- }
-
- //-----------------------------------
- technique Trail_PunchThrough
- <
- int Priority = 10;
- int NeedSorting = 0;
- int TechniqueIndex = 0;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <DiffuseMap>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = LINEAR;
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
- CullMode = CCW;
- ZEnable = true;
- ZFunc = LESSEQUAL;
- ZWriteEnable = true;
- AlphaBlendEnable = false;
- AlphaTestEnable = true;
- AlphaRef = 192;
- AlphaFunc = GREATEREQUAL;
- FOG_OPTION_PARAMETERS;
-
-
- VertexShader = compile vs_1_1 VS_Trail_Tranform();
-
- // sample tex mult vert color
- PixelShader =
- asm
- {
- ps_1_1
-
- tex t0
-
- mul r0, v0, t0
- };
- }
- }
-
-
- //-----------------------------------
- technique Trail_Additive
- <
- int Priority = 10;
- int NeedSorting = 1;
- int TechniqueIndex = 1;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <DiffuseMap>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = LINEAR;
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
-
- CullMode = CCW;
- ZEnable = true;
- ZFunc = LESSEQUAL;
- ZWriteEnable = false;
- AlphaTestEnable = false;
- AlphaBlendEnable = true;
- SrcBlend = ONE;
- DestBlend = ONE;
- FogEnable = false;
-
- FOG_OPTION_PARAMETERS;
-
-
- VertexShader = compile vs_1_1 VS_Trail_Tranform();
-
- // sample tex mult vert color
- PixelShader =
- asm
- {
- ps_1_1
-
- tex t0
-
- mul r0, v0, t0
- mul r0, r0, t0.a
- };
- }
- }
-
-
- //-----------------------------------
- technique Trail_AlphaBlend
- <
- int Priority = 10;
- int NeedSorting = 1;
- int TechniqueIndex = 2;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <DiffuseMap>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = LINEAR;
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
-
- CullMode = CCW;
- ZEnable = true;
- ZFunc = LESSEQUAL;
- ZWriteEnable = false;
- AlphaTestEnable = false;
- AlphaBlendEnable = true;
- SrcBlend = SRCALPHA;
- DestBlend = INVSRCALPHA;
- FogEnable = false;
-
- FOG_OPTION_PARAMETERS;
-
-
- VertexShader = compile vs_1_1 VS_Trail_Tranform();
-
- // sample tex mult vert color
- PixelShader =
- asm
- {
- ps_1_1
-
- tex t0
-
- mul r0, v0, t0
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- #include "mesh_shadow.fx"
- #include "mesh_shadow_projector.fx"
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------